

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layuiAdmin 网站用户 iframe 框</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/admin/layuiadmin/layui/css/layui.css" media="all">
    <style>
        .layui-input-block{
            margin-right: 110px;
        }
    </style>
</head>
<body>

<div class="layui-form" lay-filter="layuiadmin-form-useradmin" id="layuiadmin-form-useradmin" style="padding: 20px 0 0 0;">
    <div class="layui-form-item">
        <label class="layui-form-label">公告标题</label>
        <div class="layui-input-inline">
            <input type="text" name="title" lay-verify="required" placeholder="请输入公告标题" autocomplete="off" class="layui-input" id="title">
        </div>
    </div>
    <input type="hidden" name="id" id="id"/>


    <div class="layui-form-item">
        <label class="layui-form-label">公告内容</label>
        <div class="layui-input-block">
            <textarea id="texter" name="texter"></textarea>
            <textarea id="texter2" name="texter2" style="display: none;"></textarea>
        </div>
    </div>



    <div class="layui-form-item layui-hide">
        <input type="button" lay-submit lay-filter="LAY-user-front-submit" id="LAY-user-front-submit" value="确认">
    </div>
</div>

<script src="/admin/layuiadmin/layui/layui.js"></script>
<script>
    layui.config({
    base: '/admin/layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index', 'form', 'upload','tinymce'], function(){
    var $ = layui.$
    ,form = layui.form
    ,upload = layui.upload
	,t = layui.tinymce;
        
        var edit = t.render({
            elem: "#texter"
            , height: 200
			,images_upload_url:'/admin/Index/upload'
            ,plugins : 'table,axupimgs,preview,textpattern,wordcount,textcolor quickbars  lists advlist' //字符串方式
            ,toolbar : 'fontselect fontsizeselect bold formats forecolor backcolor italic underline strikethrough alignleft aligncenter alignright alignjustify formatselect preview table bullist numlist axupimgs textpattern'
            ,convert_urls:false,//取消自动转换url
            // ...
        },function(opt,edit){
            //加载完成后回调
            //编辑器的内容改变时执行 把值赋给textarea
			edit.on('blur', function(){
				$("#texter2").val(edit.getContent());
			});
        });


    })
</script>
</body>
</html>